public class 水仙花 {
    public static void main(String[] args) {
        int x = 0;
        for(int a=1;a<10;a++){
            for( int b = 0; b <10; b++){

                for(int c = 0; c <10; c++){
                    int i = a * a * a + b * b * b + c * c * c;
                    int j=a*100+b*10+c;
                    if(i==j){
                        System.out.println(i);
                        x++;

                    }

                }
            }
        }System.out.println("有"+x+"个");
    }
}
